import request from '@/utils/request'

// 查询product列表
export function listAdvertisements(query) {
  return request({
    url: '/product/advertisements/list',
    method: 'get',
    params: query
  })
}

// 查询product详细
export function getAdvertisements(id) {
  return request({
    url: '/product/advertisements/' + id,
    method: 'get'
  })
}

// 新增product
export function addAdvertisements(data) {
  return request({
    url: '/product/advertisements',
    method: 'post',
    data: data
  })
}

// 修改product
export function updateAdvertisements(data) {
  return request({
    url: '/product/advertisements',
    method: 'put',
    data: data
  })
}

// 删除product
export function delAdvertisements(id) {
  return request({
    url: '/product/advertisements/' + id,
    method: 'delete'
  })
}
